<%@ page contentType="text/html; charset=UTF-8"%>
<%@ include file="/WEB-INF/jsp/common/init.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<jsp:include page="/WEB-INF/jsp/common/common.jsp" />
	<script type="text/javascript">
	function query(){
		$("#form1").submit();
	}
	function verify_form(seal_new_id){
		$("input[name='seal_new_id']").val(seal_new_id);

		var url = "${path}/ix/seal/news/verify/verify_form.htm";
		$("#form1").attr("action", url);
		$("#form1").submit();
	}
	function mySelect(){
		var $allIds = $("input[name='much']");
        $.each($allIds,function(i,n){
        	n.checked="checked";
        });
	}
	function noSelect(){
		var $allIds = $("input[name='much']");
        $.each($allIds,function(i,n){
        	n.checked="";
        });
	}
	function myEdit(){
		var $allIds = $("input[name='much']:checked");
		var ids = "";
        $.each($allIds,function(i,n){
        	ids += n.value+",";
        });
        $("input[name='ids']").val(ids);
        var url = "${path}/ix/seal/news/verify/batch_verify.htm";
		$("#form1").attr("action", url);
		$("#form1").submit();
		//处理
	}
	
	$(function(){
		$("#emp").hide();
	})
	
	function myChk(){
		$("input:checkbox").each(function(){
   		 	 $(this).attr("disabled",true); 
   		});
   		$(".myall").each(function(){
   		 	 $(this).hide(); 
   		});
		var $allIds = $("input[name='much']:checked");
		var ids = "";
        $.each($allIds,function(i,n){
        	ids += n.value+",";
        });
        if(ids.length==0){
        	alert("请选择要处理的对象!");
        	$("input:checkbox").each(function(){
   		 	 $(this).attr("disabled",false); 
	   		});
	   		$(".myall").each(function(){
	   		 	 $(this).show(); 
	   		});
        	return ;
        }
		$("#emp").show();
	}
	function myNo(){
		$("input:checkbox").each(function(){
   		 	 $(this).attr("disabled",false); 
   		});
   		$(".myall").each(function(){
   		 	 $(this).show(); 
   		});
		$("#emp").hide();
	}
	</script>
</head>
<body>
<jsp:include page="/WEB-INF/jsp_lib/tip.jsp" />
	<div>
		<form action="${path}/ix/seal/news/verify/list.htm" id="form1" method="post">
			<input type="hidden" name="seal_new_id" />
			<input type="hidden" name="ids" />
			<h2>
				<div>新章申请审核</div>
			</h2>
			<div class="query">
				<table width="100%" border="0" align="center" cellpadding="0" cellspacing="5">
					<%-- <tr>
						<td width="60" align="right">
							<strong>标题：</strong>
						</td>
						<td width="200" align="left">
							<input name="srh_name" type="text" /> 
						</td>
						<td align="left">
							<a href="javascript:query();">
								<img src="${path}/style_cp/img/query.jpg" name="Image4" width="85" height="27" border="0" id="Image4" /> 
							</a>
						</td>
					</tr> --%>
				</table>
			</div>
			
			<table width="100%" class="listlindex">
				<tr>
				<th style="width:10%"><a class="myall" href="javascript:mySelect();">【全选】</a><a class="myall" href="javascript:noSelect();">【取消】</a></th>
				
					<th>刻章行</th>
					<th>刻章字样</th>
					<th>印章类型</th>
					<th>状态</th>
					<th>申请时间</th>
					<th>操作</th>
				</tr>
				<c:if test="${fn:length(applyingList)==0}">
					<tr>
						<td colspan="7"><div class="tip_div">暂无记录.</div></td>
					</tr>
				</c:if>	
				<c:forEach items="${applyingList}" var="v">					
					<tr>
						<td><input type="checkbox" name="much"  value="${v._id}"/></td>
						<td>${v.bname}</td>
						<td>${v.title}</td>
						<td>${v.type_name}[${v.type_config_name}]</td>
						<td>${v.flag}</td>
						<td>${v.apply_created}</td>
						<td>
							<a href="javascript:verify_form('${v._id}');" class="asave">【审批】</a>
						</td>
					</tr>
				</c:forEach>
			</table>	
			<div class="options">
				<a href="javascript:myChk();" class="asave" style="float:left;">
					【批量操作】
				</a>
				<div class="quotes">
					<page:page page="${page}" />
				</div>
				<div class="clear"></div>
			</div>	
			<div id="emp" style="height: 400px;	position: fixed;left: 36%;top: 30%;" hidden>
				<div class="query">
						<h2>
							<div>操作</div>
						</h2>
						<table width="100%" class="listlindex">
							<tr>
								<th align="right">
									是否通过：
								</th>
								<td align="left" colspan="3">
									<input name="verify_flag" value="通过" type="radio" checked="checked"/>通过
									<input name="verify_flag" value="不通过" type="radio"/>不通过
								</td>
							</tr>
							<tr>
								<th align="right">
									备注：
								</th>
								<td align="left" colspan="3">
									<textarea name="note" rows="5" cols="50"></textarea>
								</td>
							</tr>
						</table>	
						<div>&nbsp;</div>
						<a href="javascript:myEdit();">【确定】</a>
						<a href="javascript:myNo();">【取消】</a>
				</div>
			</div>	
		</form>	
		
	</div>
</body>
</html>